import 'package:flutter_mes_app/common/index.dart';

/// 报工 api
class WoreportworkApi {
  /// 报工任务列表
  static Future<List<WoreportworkTaskListItemModel>> taskList(CommonPagesReq commonPagesReq) async {
    var res = await WPHttpService.to.post(
      '/pdbill/woreportwork/getTaskList',
      data: commonPagesReq
    );
    print("taskList${res.data['data']['total']}");
     List<WoreportworkTaskListItemModel> tasks = [];
    for (var item in res.data['data']['list']) {
      tasks.add(WoreportworkTaskListItemModel.fromJson(item));
    }
    return tasks;

  }
}
